package io.renren.modules.sellerbefore.controller;

import io.renren.common.utils.Constant;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.R;
import io.renren.modules.sys.service.SysRoleService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;


import java.util.Map;

@RestController
public class IndexController {
    @Autowired
    private SysRoleService sysRoleService;

    /**
     * demo列表
     */
    @GetMapping("/sellerlist")
    public R search(@RequestParam Map<String, Object> params){
        //如果不是超级管理员，则只查询自己创建的角色列表
        PageUtils page = sysRoleService.queryPage(params);
        return R.ok().put("page", page);
    }

}
